Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the "dump server state" command by moving its logic from the client to the server to enable editor-agnostic usage. The refactoring converts a custom client-side command into a standard LSP executeCommand request, with the server handling file writing and opening via the window/showDocument LSP request.
Key changes:
- Server now handles all dump logic including reading package.json version, formatting state, writing to disk, and opening the file
- Client command simplified to a single
executeCommandrequest - Old client-side
dump_server_state.tsfile removed entirely
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| server/src/server.ts | Added async dumpServerState function, registered executeCommand capability, and added handler for workspace/executeCommand requests |
| client/src/extension.ts | Simplified command handler to send executeCommand request to server instead of handling logic client-side |
| client/src/commands/dump_server_state.ts | Removed entire file as functionality moved to server |
| client/src/commands.ts | Removed export of now-deleted dumpServerState function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
I would like to wire this up in another editor, so I shuffled some logic to the server to more easily hook it up elsewhere.